package fans_group

import (
	"longmen/server/config/global"
	"longmen/server/internal/rpc/tencentim/utils"
	pb "longmen/server/pkg/protobuf"
)

func (f *fansGroup) beforeJoinRoom() (*pb.CallbackResp, error) {
	// 业务上默认允许进入群聊
	err := AddToGroup(f.req.GroupId, f.user.UserId)
	if err != nil {
		global.Log.Error(err)
	}
	return utils.CallbackOkResp("Ok"), nil
}
